<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * CodeIgniter
 *
 * An open source application development framework for PHP 4.3.2 or newer
 *
 * @package		CodeIgniter
 * @author		ExpressionEngine Dev Team
 * @copyright	Copyright (c) 2008 - 2010, EllisLab, Inc.
 * @license		http://codeigniter.com/user_guide/license.html
 * @link		http://codeigniter.com
 * @since		Version 1.0
 * @filesource
 */

// ------------------------------------------------------------------------

/**
 * Convert Reserved XML characters to Entities
 *
 * @access	public
 * @param	$money
 * @return	$format_money
 */
if ( ! function_exists('format_money'))
{
	function format_money($money,$moneytype = '￥'){
	    $tmp_money = strrev($money);
	    $format_money = '';
	    for($i = 3;$i<strlen($money);$i+=3){
	        $format_money .= substr($tmp_money,0,3).",";
	         $tmp_money = substr($tmp_money,3);
	     }
	    $format_money .=$tmp_money;
	    $format_money = $moneytype.strrev($format_money);
	    return $format_money;
	}
}


/* End of file xml_helper.php */
/* Location: ./system/helpers/xml_helper.php */